<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;


/**
 * App\Models\SysNoteImg
 *
 * @property int $id
 * @property string $note_id 笔记id
 * @property int $is_deleted  是否删除 0否 1是
 * @property string $url 图片地址json{[url:1.jpg,width:100,height:1000]}
 * @property int $weight 图片排序
 * @property \Illuminate\Support\Carbon $created_at 创建时间戳
 * @property \Illuminate\Support\Carbon $updated_at 更新时间戳
 * @method static \Illuminate\Database\Eloquent\Builder|SysNoteImg newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|SysNoteImg newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|SysNoteImg query()
 * @mixin \Eloquent
 */
class SysNoteImg extends BaseModel
{
    use HasFactory;

    protected $table = "sys_note_img_";
    protected $primaryKey = "id";
    protected $keyType = "int";
    public $timestamps = true;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [];

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'created_at' => "timestamp",
        'updated_at' => "timestamp",
    ];

    /**
     * select columns
     * @var array
     */
    public $fields = [
        'getDetail' => ['note_id','url'],
    ];
}
